package 蓝桥真题;

import java.time.LocalDate;

public class 顺子日期 {
       
	   public static void main(String[] args) {
		      LocalDate date = LocalDate.of(2022, 1, 1);
		      int res=0;
		      while(date.getYear()<=2022){
		    	    
		    	    String ds=""+date.getYear();
		    	    int month=date.getMonthValue();
		    	    ds+=month>9?month:"0"+month;
		    	    int day=date.getDayOfMonth();
		    	    ds+=day>9?day:"0"+day;
		    	    for(int i=0;i<=5;i++){
		    	    	if((ds.charAt(i+2)-ds.charAt(i+1)==1)&&(ds.charAt(i+1)-ds.charAt(i)==1)){
		    	    		res++;break;
		    	    	}
		    	    }
		    	    date=date.plusDays(1L);
		    	    
		      }
		      System.out.print(res);
	}
}
